import Predict from './Predict.js'
import ZodTypes from './ZodTypes.js'

// 星座类
class Zodiac {
    /**
     * Constructor
     * 构造函数
     *
     * @param  <+Comment+>
     *
     * @return <+Return+>
     */
    constructor(name) {
        this.buildZodiac(name)
    }

    /**
     * BuildZodiac()
     * 构建星座
     *
     * @param name 星座名
     *
     * @return void
     */
    buildZodiac(name) {
        this.name = name
        // console.log(ZodTypes[name])
        this.index = ZodTypes[name].index
        this.nameZh = ZodTypes[name].zh
        this.background = ZodTypes[name].url
        this.buttonicon = ZodTypes[name].burl
        this.ele = ZodTypes[name].ele
    }

    /**
     * GetPredict
     * 获取预测
     *
     * @param array pool 占卜池
     *
     * @return <+Return+>
     */
    getPredict(pool) {
        return new Predict(this, pool)
    }
}

export default Zodiac
